//
//  homeViewController.h
//  IMGII
//
//  Created by 步遴 李 on 12-4-12.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Blog.h"
#import "Comment.h"
#import "AppDelegate.h"
#import "blogViewController.h"
#import "EGORefreshTableHeaderView.h"



@interface homeViewController : UIViewController
<EGORefreshTableHeaderDelegate,UITableViewDataSource,UITableViewDelegate>{
    Blog *blog;
    AppDelegate *appdelegate;
    NSManagedObjectContext *context;
    NSEntityDescription *entity;
    NSArray *blogs;
    NSPredicate *pre;
    NSFetchRequest *cdrequest;
    NSInteger blogcount,currentCount;
    NSError *error;
    NSArray *controllers;
    UIToolbar *topBar;
    UIActivityIndicatorView *progressInd;
    UITableView *blogstable;
    UIBarItem *butNew,*butInfo,*butProduct,*butSkill,*butPs,*butEquip;
    NSInteger page;
    EGORefreshTableHeaderView *_refreshHeaderView;
	BOOL _reloading;
}
@property (strong,nonatomic) IBOutlet UIBarItem *butNew;
@property (strong,nonatomic) IBOutlet UIBarItem *butInfo;
@property (strong,nonatomic) IBOutlet UIBarItem *butProduct;
@property (strong,nonatomic) IBOutlet UIBarItem *butSkill;
@property (strong,nonatomic) IBOutlet UIBarItem *butPs;
@property (strong,nonatomic) IBOutlet UIBarItem *butEquip;

@property (strong,nonatomic) IBOutlet UITableView *blogstable;
@property (strong,nonatomic) IBOutlet UIToolbar *topBar;
@property (retain,nonatomic) NSPredicate *pre;
@property (strong,nonatomic) NSArray *controllers;
@property (strong,nonatomic) Blog *blog;
@property (retain,nonatomic) NSArray *blogs;
@property (readwrite, nonatomic, retain) NSOperationQueue *operationQueue;
-(IBAction)ButClick:(id)sender;

-(NSArray *)addUrl:(NSString *)tcontext;

- (NSString*)uniquePath;
- (void)reloadTableViewDataSource;
- (void)doneLoadingTableViewData;
@end
